<script>
	import amapFile from '@/common/amap-wx.js';
	import wxLocation from '@/common/location.js';
	import store from './store/index';
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			getlocation() {
				const wx = new wxLocation();
				wx.getAddress().then(res => {
					console.log(res)
					var location = {
						lat: res.result.location.lat,
						lng: res.result.location.lng,
						city:res.city
					};
					
					console.log(location)
					uni.setStorageSync("location", location)
					store.commit("addlocation")
					// this.$u.post('/index/storeDetail', {
					// 	store_id: this.id,
					// 	lat: res.result.location.lat,
					// 	lng: res.result.location.lng,
					// }).then(res => {
					// 	this.list = [res];
					// 	this.info = res;
					// 	resolve(res)
					// })
				}).catch(err => {
				
				})
			}
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";

	.cell-hover-class {
		background-color: rgb(235, 237, 238);
	}
</style>
